<template>
  <div class="playItem">
    <img class="bigImg" :src="props.playlist.coverImgUrl" alt="" />
    <div class="playHead">
      <div class="playRight">
        <Svgview ion="#icon-zuojiantou" @click="$router.go(-1)" />
      </div>
      <span>{{ props.title }}</span>
      <div class="playLeft">
        <Svgview ion="#icon-sousuo" />
        <Svgview ion="#icon-gengduo-shuxiang" />
      </div>
    </div>
  </div>
  <div class="playContent">
    <img :src="props.playlist.coverImgUrl" alt="" class="contentImg" />
    <div class="contentRight">
      <h3>{{ props.playlist.name }}</h3>
      <div class="creator" v-if="props.playlist.creator">
        <img :src="props.playlist.creator.avatarUrl" alt="" />
        <span>{{ props.playlist.creator.nickname }}</span>
      </div>
      <div class="description">
        <span>{{ props.playlist.description }}</span>
        <Svgview ion="#icon-youjiantou" />
      </div>
    </div>
  </div>
</template>

<script setup>
import Svgview from "@/components/SvgView";
const props = defineProps({
  playlist: Object,
  title: String,
});
</script>

<style scoped lang="less">
.playItem {
  width: 100%;
  position: relative;

  .bigImg {
    width: 100%;
    height: 5.5rem;
    z-index: -1;
    filter: blur(0.6rem);
    position: absolute;
    top: 0;
  }

  >span {
    color: white;
    font-size: 30px;
  }

  .playHead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0px;
    width: 100%;
    backdrop-filter: blur(6px) brightness(100%);
    padding: 10px;

    .playRight,
    .playLeft {
      width: 50px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 0px 5px;

      .icon {
        fill: black;
      }
    }

    >span {
      font-size: 16px;
      color: black;
    }
  }
}

.playContent {
  display: flex;
  justify-content: space-around;
  margin-top: 60px;

  >img {
    width: 130px;
    height: 130px;
    border-radius: 20px;
  }

  .contentRight {
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    h3 {
      color: white;
      font-size: 10px;
    }

    .creator {
      display: flex;
      align-items: center;
      width: 100%;
      margin-top: 30px;

      img {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        margin-right: 5px;
      }

      span {
        color: silver;
      }
    }

    .description {
      color: silver;
      display: flex;
      align-items: center;
      margin-top: 20px;

      span {
        font-size: 10px;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 85%;
      }

      .icon {
        width: 10px;
        height: 10px;
        fill: silver;
      }
    }
  }
}
</style>
